﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Fee.aspx.cs" Inherits="User_Fee" MasterPageFile="../MasterPage.master" %>

<%@ Import Namespace="System.Configuration" %>
<%@ Import Namespace="Common" %>
<%@ Import Namespace="DAL" %>
<%@ Register Src="../common/Pager.ascx" TagName="Pager" TagPrefix="uc2" %>
<%@ Register Src="User_Left.ascx" TagName="User_Left" TagPrefix="uc1" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table cellpadding="0" cellspacing="2" width="100%" border="0">
        <tr>
            <td class="leftTd" valign="top" width="20%">
                <uc1:User_Left ID="User_Left1" runat="server" />
            </td>
            <td width="80%" valign="top">
                <table cellpadding="0" cellspacing="0" width="100%" border="0" align="center">
                    <tr>
                        <td class="leftTd" valign="top">
                            <table cellpadding="0" cellspacing="0" width="100%" border="0" align="center">
                                <tr>
                                    <td class="titleStyle">
                                        <%= WebUtility.GetTitleByMenu(MenuType) %>
                                    </td>
                                </tr>
                            </table>
                            <br />
                            <table width="98%" border="0" cellpadding="0" cellspacing="1" align="center" bgcolor="#000066">
                                <tr>
                                    <td style="height: 30px;" class="banma22_1">
                                        &nbsp;姓名：
                                        <asp:DropDownList ID="MUserKey" runat="server">
                                            <asp:ListItem Value="">- 请选择姓名 - </asp:ListItem>
                                        </asp:DropDownList>
                                        &nbsp;关键字：<asp:TextBox ID="Keyword" runat="server" Width="60px" CssClass="face"></asp:TextBox>&nbsp;&nbsp;
                                        <asp:TextBox ID="OneDate" runat="server" Width="70px" CssClass="face" Text="选择开始日期"></asp:TextBox>
                                        &nbsp;&nbsp;<asp:TextBox ID="TwoDate" runat="server" Width="70px" CssClass="face" Text="选择结束日期"></asp:TextBox>&nbsp;&nbsp;
                                        <asp:Button ID="submit" runat="server" Text=" 搜 索 " CssClass="button" OnClick="submit_Click" />&nbsp;&nbsp;
                                        <asp:Button ID="submit0" runat="server" Text=" 导 出 " CssClass="button" OnClick="submit0_Click" />
                                    </td>
                                </tr>
                            </table>
                            <br />
                            <asp:ListView ID="lv_Fee" runat="server" OnItemCommand="lv_Fee_ItemCommand" OnDataBound="lv_Fee_DataBound">
                                <LayoutTemplate>
                                    <table id="table1" runat="server" width="98%" border="0" cellpadding="0" cellspacing="1" align="center" bgcolor="#000066">
                                        <tr>
                                            <td style="height: 25px; width: 5%;" class="banma1 TextCenters">
                                                序号
                                            </td>
                                            <td style="height: 25px; width: 8%;" class="banma1 TextCenters">
                                                姓名
                                            </td>
                                            <td style="height: 25px; width: 10%;" class="banma1 TextCenters">
                                                日期
                                            </td>
                                            <td style="height: 25px; width: 10%;" class="banma1 TextCenters">
                                                预约单号
                                            </td>
                                            <td style="height: 25px; width: 10%;" class="banma1 TextCenters">
                                                客户名称
                                            </td>
                                            <td style="width: 8%;" class="banma1 TextCenters">
                                                交通费(元)
                                            </td>
                                            <td style="width: 8%;" class="banma1 TextCenters">
                                                餐费(元)
                                            </td>
                                            <td style="width: 8%;" class="banma1 TextCenters">
                                                其他费用(元)
                                            </td>
                                            <td style="width: 12%;" class="banma1 TextCenters">
                                                备注
                                            </td>
                                            <td style="width: 10%;" class="banma1 TextCenters">
                                                操作
                                            </td>
                                        </tr>
                                        <tr id="itemPlaceholder" runat="server">
                                        </tr>
                                        <br />
                                    </table>
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <tr>
                                        <td class="banma22_2" style="height: 25px; text-align: center;">
                                            <%# Container.DataItemIndex+1 %>
                                        </td>
                                        <td class="banma22_2" style="height: 25px; text-align: center;">
                                            <%# new Account().GetAccountName(Eval("MUserKey")) %>
                                        </td>
                                        <td class="banma22_2" style="height: 25px; text-align: center;">
                                            <%# Convert.ToDateTime(Eval("FeeTime")).ToString("yyyy-MM-dd")%>
                                        </td>
                                        <td class="banma22_2" style="height: 25px; text-align: center;">
                                            <a class="thickbox" href="../Business/Business_View.aspx?DanNum=<%# Eval("DanNum") %>&KeepThis=true&TB_iframe=true&height=550&width=650">
                                                <%# Eval("DanNum")%></a>
                                        </td>
                                        <td class="banma22_2" style="height: 25px; text-align: center;">
                                            <%# News.GetCusName(Eval("DanNum"))%>
                                        </td>
                                        <td class="banma22_2" style="height: 25px; text-align: center;">
                                            <%# Eval("TransFee")%>
                                        </td>
                                        <td class="banma22_2" style="height: 25px; text-align: center;">
                                            <%# Eval("FoodFee")%>
                                        </td>
                                        <td class="banma22_2" style="height: 25px; text-align: center;">
                                            <%# Eval("OtherFee")%>
                                        </td>
                                        <td class="banma22_2" style="height: 25px; text-align: center;">
                                            <%# Eval("Remark")%>
                                        </td>
                                        <td class="banma22_2" style="height: 25px; text-align: center;">
                                            <% if (UserType == 4)
                                               { %>
                                            <a class="a_button" href='Fee_Add.aspx?menutype=231&FeeKey=<%# Eval("FeeKey") %>'><font color="#000066">修改</font></a>
                                            <asp:LinkButton ID="Del" runat="server" CssClass="a_button" CommandName="del" CommandArgument='<%# Eval("FeeKey")%>' OnClientClick="return confirm('该记录会被删除，同时对应的预约单号中考勤费用将清零，确认删除？');"><font color="#000066">删除</font></asp:LinkButton><% } %>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <AlternatingItemTemplate>
                                    <tr>
                                        <td class="banma22_1" style="height: 25px; text-align: center;">
                                            <%# Container.DataItemIndex+1 %>
                                        </td>
                                        <td class="banma22_1" style="height: 25px; text-align: center;">
                                            <%# new Account().GetAccountName(Eval("MUserKey")) %>
                                        </td>
                                        <td class="banma22_1" style="height: 25px; text-align: center;">
                                            <%# Convert.ToDateTime(Eval("FeeTime")).ToString("yyyy-MM-dd") %>
                                        </td>
                                        <td class="banma22_1" style="height: 25px; text-align: center;">
                                            <a class="thickbox" href="../Business/Business_View.aspx?DanNum=<%# Eval("DanNum") %>&KeepThis=true&TB_iframe=true&height=550&width=650">
                                                <%# Eval("DanNum")%></a>
                                        </td>
                                        <td class="banma22_2" style="height: 25px; text-align: center;">
                                            <%# News.GetCusName(Eval("DanNum"))%>
                                        </td>
                                        <td class="banma22_1" style="height: 25px; text-align: center;">
                                            <%# Eval("TransFee")%>
                                        </td>
                                        <td class="banma22_1" style="height: 25px; text-align: center;">
                                            <%# Eval("FoodFee")%>
                                        </td>
                                        <td class="banma22_1" style="height: 25px; text-align: center;">
                                            <%# Eval("OtherFee")%>
                                        </td>
                                        <td class="banma22_1" style="height: 25px; text-align: center;">
                                            <%# Eval("Remark")%>
                                        </td>
                                        <td class="banma22_1" style="height: 25px; text-align: center;">
                                            <% if (UserType == 4)
                                               { %>
                                            <a class="a_button" href='Fee_Add.aspx?menutype=231&FeeKey=<%# Eval("FeeKey") %>'><font color="#000066">修改</font></a>
                                            <asp:LinkButton ID="Del" runat="server" CssClass="a_button" CommandName="del" CommandArgument='<%# Eval("FeeKey")%>' OnClientClick="return confirm('该记录会被删除，同时对应的预约单号中考勤费用将清零，确认删除？');"><font color="#000066">删除</font></asp:LinkButton><% } %>
                                        </td>
                                    </tr>
                                </AlternatingItemTemplate>
                            </asp:ListView>
                            <!-- Page Begin -->
                            <asp:DataPager ID="DataPager1" runat="server" PagedControlID="lv_Fee" PageSize="20">
                                <Fields>
                                    <asp:TemplatePagerField>
                                        <PagerTemplate>
                                            <table width="96%" border="0" cellpadding="0" cellspacing="0" align="center">
                                                <tr>
                                                    <td width="36%" height="30">
                                                        页次：<b><%# WebUtility.GetCurrentPage(Container.StartRowIndex, Container.PageSize)%></b>/<b><%# WebUtility.GetTotalPage(Container.TotalRowCount, Container.PageSize)%></b>页 每页<b><%# Container.PageSize  %></b>条 共<b><%# Container.TotalRowCount %></b>条
                                                    </td>
                                                    <td width="64%" height="30" style="text-align: right;">
                                            分页：
                                        </PagerTemplate>
                                    </asp:TemplatePagerField>
                                    <asp:NextPreviousPagerField ButtonType="Image" FirstPageImageUrl="../images/first.gif" ShowFirstPageButton="true" ShowNextPageButton="false" ShowPreviousPageButton="false" />
                                    <asp:NumericPagerField CurrentPageLabelCssClass="SelectedPage" NumericButtonCssClass="NotSelectedPage" />
                                    <asp:NextPreviousPagerField ButtonType="Image" LastPageImageUrl="../images/last.gif" ShowLastPageButton="true" ShowNextPageButton="false" ShowPreviousPageButton="false" />
                                    <asp:TemplatePagerField>
                                        <PagerTemplate>
                                            转到：
                                            <asp:DropDownList ID="PageList" runat="server" AutoPostBack="true" OnSelectedIndexChanged="PageList_SelectedIndexChanged">
                                            </asp:DropDownList>
                                            </td> </tr> </table>
                                        </PagerTemplate>
                                    </asp:TemplatePagerField>
                                </Fields>
                            </asp:DataPager>
                            <!-- Page End -->
                        </td>
                    </tr>
                </table>
</asp:Content>
